#ifndef _THREAD_H
#define _THREAD_H

#include <iostream>
#include <list>
#include <thread>
#include <mutex>

class mesCommand
{
private:
    std::list<int> m_command;

public:
    void inMesgCommand(void)
    {
        for(int i = 0; i < 100000; i++)
        {
            m_command.push_back(i);
        }
    }

    bool outMesgCommand(void)
    {
        if(!m_command.empty())
        {
            for(int i = 0; i < 100000; i++)
            {
                std::cout << "command = " << m_command.front() << std::endl;
            }
            m_command.pop_front();
            return true;
        }
        return false;
    }

    int operator()(int value)const
    {
        std::cout << "value = " << value << std::endl;
        return value;
    }
};

#endif //_THREAD_H